from tqdm import tqdm
import time
import sys

def tqdm_gui():
    file1 = sys.stdout
    with tqdm(iterable=range(100),total=100,file=file1) as pbar:
        for i in range(100):
            time.sleep(0.01)
            # pbar.set_description("iter %d" % i)
            pbar.update(1)

if __name__ == '__main__':
    tqdm_gui()